 import Page from '../../common/page';
// Page({
// });
Page({
    data: {
      text: "This is page data.",
      newcodes:[],
      htnlText:""
    },
    onLoad() {
      var _that = this;
        wx.request({
            url: 'http://localhost:8888/newcoder',
            header: {
              'content-type': 'application/json' // 默认值
            },
            success (res) {
              _that.setData({
                newcodes:res.data
              });
              console.log(res.data[0].content);
              var htmltxt = res.data[0].content;
              _that.setData({
                htnlText:res.data[0].content
              });
              
              //console.log(_that.data.newcodes)
            }
          })
          
    }
  })
  